package work.xiaohong.mina.message;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import work.xiaohong.mina.utils.CountUtil;

import static io.swagger.v3.oas.annotations.media.Schema.AccessMode.READ_ONLY;


/**
 * @author Kevin
 * @data 4/23/2022 9:41 PM
 * @description plc消息头
 **/
@Data
@ToString
public class PlcMessageHead {

  /**
   * 消息序列号
   */
  @Schema(description = "消息序列号",accessMode = READ_ONLY)
  private Integer sequenceNumber = CountUtil.getSequence();

  /**
   * 该消息是否需要响应 0 不需要 1需要
   */
  private Boolean acknowledgementRequired;

  /**
   * 消息载体类型
   */
  private String payloadType;

}
